﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    public class Customer
    {
        public string CustomerId { get; set; }
        public string Name { get; set; }

        public Customer(string customerId, string name)
        {
            CustomerId = customerId;
            Name = name;
        }

        public override bool Equals(object obj)
        {
            return obj is Customer customer &&
                   CustomerId == customer.CustomerId;
        }

        public override int GetHashCode()
        {
            return CustomerId?.GetHashCode() ?? 0;
        }

        public override string ToString()
        {
            return $"客户ID: {CustomerId}, 姓名: {Name}";
        }
    }
}
